Package-level declarations

Types

Link copied to clipboard

EN Pre-computed binary-search lookup table for ln(ar / 1.78f).

Link copied to clipboard
Link copied to clipboard
object DimenCache

EN Global, lock-free, shared cache for all AppDimens dimension calculations.

Link copied to clipboard
Link copied to clipboard

EN Screen metric used to resolve Percent bounds (matches sdp / wdp / hdp axes).

Link copied to clipboard
sealed class ResizeBound

EN One end of a resize range or the step granularity.

Link copied to clipboard
data class ResizeRangePx(val minPx: Float, val maxPx: Float, val stepPx: Float)

EN Normalizes min/max order; steps covers [lowPx,highPx] with stepPx granularity.

Properties

Link copied to clipboard
val LocalUiModeType: ERROR CLASS: Unresolved name: compositionLocalOf

EN CompositionLocal for the current UiModeType. PT CompositionLocal para o UiModeType atual.

Link copied to clipboard
private const val MAX_RESIZE_STEPS: Int = 4096

EN Builds ascending px samples from minPx to maxPx inclusive, advancing by stepPx. If stepPx<= 0, returns [minPx.coerceIn(minPx, maxPx)] (single sample).

Functions

Link copied to clipboard
fun AppDimensProvider(content: () -> Unit)

EN Provider that automatically computes and provides the UiModeType (including foldables) to all child components. Recommended for performance: without it, getCurrentUiModeType falls back to UiModeType.fromConfiguration on every *Mode / *Screen facilitator call. See the root README section Performance: DimenCache → Integration checklist.

Link copied to clipboard
fun buildResizeStepsPx(minPx: Float, maxPx: Float, stepPx: Float): FloatArray
Link copied to clipboard
inline fun fastLn(normalizedAr: Float): Float

EN Fast natural-logarithm via binary-search lookup table, falling back to the intrinsic ln().

Link copied to clipboard
internal fun Context.findActivity(): Activity?

EN Walks ContextWrapper chain to find the hosting Activity, if any. PT Percorre a cadeia de ContextWrapper para encontrar a Activity hospedeira, se existir.

Link copied to clipboard
fun findLargestFittingResizePx(sortedStepsPx: FloatArray, fits: (candidatePx: Float) -> Boolean): Float

EN Largest step in sortedStepsPx (ascending) for which fits returns true. If none fit, returns 0f.

Link copied to clipboard

EN Internal helper to get the UiModeType, falling back to computing it if not provided. PT Auxiliar interno para obter o UiModeType, recalculando se não for fornecido.

Link copied to clipboard
internal fun layoutRememberStamp(configuration: Configuration, context: Context): Long

EN Layout stamp for androidx.compose.runtime.remember keys. Uses Configuration.hashCode which reflects actual content (densityDpi, locale, fontScale, orientation, etc.), ensuring correct recomposition when any configuration field changes.

Link copied to clipboard
fun literalPercentOfReferenceDp(percent: Float, referenceDp: Float, configuration: Configuration, ignoreMultiWindows: Boolean): Float
Link copied to clipboard
fun literalPercentOfScreenDp(percent: Float, qualifier: DpQualifier, configuration: Configuration, ignoreMultiWindows: Boolean): Float
Link copied to clipboard
internal fun pxRememberStamp(layoutStamp: Long, density: ERROR CLASS: Symbol not found for Density): Long

EN layoutRememberStamp xor raw bits of Density.density and Density.fontScale for Px composable paths. PT layoutRememberStamp xor bits brutos de densidade e escala de fonte para caminhos Px.

Link copied to clipboard
internal fun rememberDimenDp(cacheKey: Long, layoutStamp: Long, androidContext: Context, compute: () -> Float): ERROR CLASS: Symbol not found for Dp
Link copied to clipboard
internal fun rememberDimenPxFromDp(cacheKey: Long, pxStamp: Long, androidContext: Context, density: ERROR CLASS: Symbol not found for Density, compute: () -> Float): Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

EN % of Configuration.smallestScreenWidthDp. PT % do menor lado (sw).

Link copied to clipboard
Link copied to clipboard
fun ResizeBound.resolveToPx(configuration: Configuration, density: Float, fontScale: Float): Float

EN Converts bound to px for layout/measure (density + font scale for sp).

Link copied to clipboard
internal fun scaledEntryRememberStamp(uiModeOrdinal: Int, configuration: Configuration, aspectRatio: Float, ignoreMultiWindows: Boolean): Long

EN Stamp equivalent to the former multi-key remember for com.appdimens.dynamic.compose.DimenScaled / com.appdimens.dynamic.compose.ScaledSp custom entry resolution. PT Carimbo equivalente ao antigo remember multi-chave para resolução de entradas customizadas.